package com.cristina.attention.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cristina.attention.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 好友申请 -
 * A 添加 B 为好友, 会将申请信息暂存到 好友申请(friend_apply) 中,
 * 等待 B 接受同意后, 在再 friend 表中插入一条好友记录,只有已接受才会生成好友记录
 *
 * @author by superman
 */
@Data
@TableName(value = "friend_apply")
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class FriendApply extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    @TableField(value = "id")
    private Long id;

    @ApiModelProperty(value = "添加时间", hidden = true)
    @TableField(value = "apply_time")
    private Long applyTime;

    @ApiModelProperty(value = "源对象", hidden = true)
    @TableField(value = "origin_id")
    private Long originId;

    @ApiModelProperty(value = "目标对象", hidden = true)
    @TableField(value = "target_id")
    private Long targetId;

    @ApiModelProperty(value = "是否同意好友申请", hidden = true)
    @TableField(value = "agree")
    private boolean agree;

}
